package com.haoniu.premises.service.impl;

import java.util.List;
import com.haoniu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haoniu.premises.mapper.TbPremisesInfoMapper;
import com.haoniu.premises.domain.TbPremisesInfo;
import com.haoniu.premises.service.ITbPremisesInfoService;

/**
 * 楼盘信息Service业务层处理
 * 
 * @author haoniu
 * @date 2022-07-15
 */
@Service
public class TbPremisesInfoServiceImpl implements ITbPremisesInfoService 
{
    @Autowired
    private TbPremisesInfoMapper tbPremisesInfoMapper;

    /**
     * 查询楼盘信息
     * 
     * @param id 楼盘信息主键
     * @return 楼盘信息
     */
    @Override
    public TbPremisesInfo selectTbPremisesInfoById(Long id)
    {
        return tbPremisesInfoMapper.selectTbPremisesInfoById(id);
    }

    /**
     * 查询楼盘信息列表
     * 
     * @param tbPremisesInfo 楼盘信息
     * @return 楼盘信息
     */
    @Override
    public List<TbPremisesInfo> selectTbPremisesInfoList(TbPremisesInfo tbPremisesInfo)
    {
        return tbPremisesInfoMapper.selectTbPremisesInfoList(tbPremisesInfo);
    }

    /**
     * 新增楼盘信息
     * 
     * @param tbPremisesInfo 楼盘信息
     * @return 结果
     */
    @Override
    public int insertTbPremisesInfo(TbPremisesInfo tbPremisesInfo)
    {
        return tbPremisesInfoMapper.insertTbPremisesInfo(tbPremisesInfo);
    }

    /**
     * 修改楼盘信息
     * 
     * @param tbPremisesInfo 楼盘信息
     * @return 结果
     */
    @Override
    public int updateTbPremisesInfo(TbPremisesInfo tbPremisesInfo)
    {
        tbPremisesInfo.setUpdateTime(DateUtils.getNowDate());
        return tbPremisesInfoMapper.updateTbPremisesInfo(tbPremisesInfo);
    }

    /**
     * 批量删除楼盘信息
     * 
     * @param ids 需要删除的楼盘信息主键
     * @return 结果
     */
    @Override
    public int deleteTbPremisesInfoByIds(Long[] ids)
    {
        return tbPremisesInfoMapper.deleteTbPremisesInfoByIds(ids);
    }

    /**
     * 删除楼盘信息信息
     * 
     * @param id 楼盘信息主键
     * @return 结果
     */
    @Override
    public int deleteTbPremisesInfoById(Long id)
    {
        return tbPremisesInfoMapper.deleteTbPremisesInfoById(id);
    }
}
